<?php
session_start();
$userword=md5($_SESSION['userword']);
$rightword=$_SESSION['password'];
if ($rightword!=$userword){
    //echo "<script>alert('密码错误，请检查后重新输入,5s后自动跳转')</script>";
    header("Location: login.php");
}
else{
?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="format-detection" content="telephone=no">
        <title>班级通讯录</title>
        <link rel="stylesheet" href="/css/style.css">
    </head>
    <body>
    <header class="fixed">
        <div class="header">
            <h1>班级通讯录<h1/>
        </div>
    </header>
    <div id="letter" ></div>
    <div class="sort_box">
        <?php

        $file = fopen("address/address.csv","r");
        while($member=fgetcsv($file,10000,","))
        {
            echo <<< EOF
            <div class="sort_list">
                <div class="num_logo"><img src="img/img.png" alt=""></div>
                <div class="num_name"><a href="tel:$member[0]">$member[1]     $member[0]</a></div>
            </div>
EOF;

        }
        fclose($file);
        ?>
    </div>
    <div class="initials">
        <ul>
            <li><img src="img/068.png"></li>
        </ul>
    </div>
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/jquery.charfirst.pinyin.js"></script>
    <script type="text/javascript" src="js/sort.js"></script>
    </body>
    </html>
<?php }?>
